<?php if (isset($_SERVER['HTTP_USER_AGENT']) && !strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6')) echo '<?xml version="1.0" encoding="UTF-8"?>'. "\n"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php echo $direction; ?>" lang="<?php echo $lang; ?>" xml:lang="<?php echo $lang; ?>">
<head>
<title><?php echo $title; ?></title>
<base href="<?php echo $base; ?>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php if ($description) { ?>
<meta name="description" content="<?php echo $description; ?>" />
<?php } ?>
<?php if ($keywords) { ?>
<meta name="keywords" content="<?php echo $keywords; ?>" />
<?php } ?>
<?php if ($icon) { ?>
<link href="<?php echo $icon; ?>" rel="icon" />
<?php } ?>
<?php foreach ($links as $link) { ?>
<link href="<?php echo $link['href']; ?>" rel="<?php echo $link['rel']; ?>" />
<?php } ?>
<link rel="stylesheet" type="text/css" media="all" href="catalog/view/theme/default/stylesheet/bootstrap.css"/>
<link rel="stylesheet" type="text/css" media="all" href="catalog/view/theme/default/stylesheet/responsive.css"/>


<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/stylesheet.css" />
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/mstyle.css" />



<?php foreach ($styles as $style) { ?>
<link rel="<?php echo $style['rel']; ?>" type="text/css" href="<?php echo $style['href']; ?>" media="<?php echo $style['media']; ?>" />
<?php } ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/ui/themes/ui-lightness/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/external/jquery.cookie.js"></script>
<script type="text/javascript" src="catalog/view/javascript/jquery/colorbox/jquery.colorbox.js"></script>
<link rel="stylesheet" type="text/css" href="catalog/view/javascript/jquery/colorbox/colorbox.css" media="screen" />
<script type="text/javascript" src="catalog/view/javascript/jquery/tabs.js"></script>
<script type="text/javascript" src="catalog/view/javascript/common.js"></script>
<?php foreach ($scripts as $script) { ?>
<script type="text/javascript" src="<?php echo $script; ?>"></script>
<?php } ?>
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie7.css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="catalog/view/theme/default/stylesheet/ie6.css" />
<script type="text/javascript" src="catalog/view/javascript/DD_belatedPNG_0.0.8a-min.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('#logo img');
</script>
<![endif]-->
<?php echo $google_analytics; ?>
</head>
<body>
<div id="container" class="">
<div id="motopress-main" class="motopress-wrapper">
<div class="" id="header">
<div class="">
<div class="">
<div class="">
<div class="shop_nav">
<div class="shop-nav">
<ul id="shopnav" class="shop-menu">
<?php if (!$logged) { ?>
<li><a href="<?php echo $this->url->link('account/register', '', 'SSL');?>" class="register-link" title="Registration">Đăng ký</a> </li>
<li><a href="<?php echo $this->url->link('account/login', '', 'SSL');?>" class="login-link" title="Login">Đăng nhập</a> </li>
    <?php } else { ?>
	<li><a href="<?php echo $this->url->link('account/edit', '', 'SSL');?>" class="login-link" title="">Xin chào <?php echo $this->customer->getFirstName();?></a> </li>
	<li><a href="<?php echo $this->url->link('account/account', '', 'SSL');?>" class="login-link" title="Xem thông tin cá nhân">Thông tin cá nhân</a> </li>
	<li><a href="<?php echo $this->url->link('account/order', '', 'SSL');?>" class="login-link" title="Xem lịch sử đơn hàng">Đơn hàng</a> </li>
	<li><a href="<?php echo $this->url->link('account/logout', '', 'SSL');?>" class="login-link" title="Đăng xuất">Đăng xuất</a> </li>
    <?php } ?>
</ul>
</div> </div>
<div class="clearfix"></div>
<div class="middle_header">
<div class="">
<div class="">
 <?php if ($logo) { ?>
<div class="logo pull-left">
<a href="logo_h logo_h__img"><a href="<?php echo $home; ?>"><img src="<?php echo $logo; ?>" title="<?php echo $name; ?>" alt="<?php echo $name; ?>" /></a>
<p class="logo_tagline"></p> 
</div>
<?php }?>
  </div>
<div class="">
<?php echo $cart; ?>
 
<div class="search-form search-form__h hidden-phone clearfix">
<input type="text" name="filter_name" value="<?php echo @$filter_name; ?>" placeholder="search" class="search-form_it">
<input type="submit" value="" id="button-search" class="search-form_is btn btn-primary">

</div>
  </div>
</div>
</div>
</div>
<div class="">
<div class="main_manu">
 
<nav class="nav nav__primary clearfix">
<ul id="topnav" class="sf-menu sf-js-enabled">
<li id="menu-item-1807" class="menu-item menu-item-type-post_type menu-item-object-page <?php echo ($home_active == 1)?'current-menu-item':'';?>"><a href="<?php echo $home; ?>"><?php echo $text_home; ?></a></li>


<li><a href="gioi-thieu.html">Giới thiệu</a>
<li class="menu_sub"><a href="javascript:void(0);">Sản phẩm</a>
	
<ul>
  <?php 
  if ($categories) { ?>
    <?php foreach ($categories as $category) { ?>
	<?php if($category['category_id'] == $category_id){ ?>
     <li><a class="active" href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
	<?php }else{ ?>
	 <li class="<?php echo ($category['children'])?'arrow':'';?>"><a href="<?php echo $category['href']; ?>"><?php echo $category['name']; ?></a>
	<?php } ?> 
      <?php if ($category['children']) { ?>
        <?php for ($i = 0; $i < count($category['children']);) { ?>
        <ul>
          <?php $j = $i + ceil(count($category['children']) / $category['column']); ?>
          <?php for (; $i < $j; $i++) { ?>
          <?php if (isset($category['children'][$i])) { ?>
          <li class="<?php echo (count($category['children'][$i]['children']) >0)?'arrow':'';?>"><a href="<?php echo $category['children'][$i]['href']; ?>"><?php echo $category['children'][$i]['name']; ?></a>
			<?php 
			
			if (count($category['children'][$i]['children']) >0) { ?>
			<ul>
			  <?php $k = count($category['children'][$i]['children']);
					$m = 0;

 ?>
			  <?php for (; $m < $k; $m++) { 
			
			  	//print_r($category['children'][$i]['children'][$m]);
			  ?>
			  <?php if (isset($category['children'][$i]['children'][$m])) { ?>
			  <li><a href="<?php echo $category['children'][$i]['children'][$m]['href']; ?>"><?php echo $category['children'][$i]['children'][$m]['name']; ?></a></li>
			  <?php } ?>
			  <?php } ?>
			</ul>
			 <?php } ?>
			
		  </li>
          <?php } ?>
          <?php } ?>
        </ul>
        <?php } ?>
      <?php } ?>
    </li>
    <?php } ?>
	<?php } ?>
	</ul>
	</li>
<?php if($informations){ ?>
  <?php foreach ($informations as $information) { ?>
  	<?php if($information['id'] == $information_id){?>
  	  <li><a class="active" href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
  	<?php }else{?>
      <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
    <?php } ?>
  <?php } ?>
  <?php } ?>
</ul></nav>  </div>
</div> </div>
</div>
</div>








</div>

 
<div id="notification"></div>
